from src import problems, measure, astar_solution, beamsearch_solution
import matplotlib.pyplot as     plt
import test_runner
import graphic_problems_2
from heuristics import *

algos = []

heu = [
man_min(),man_max(), fast_manhattan_dirt(), averaged_scaled_manhattan_dirt(10), scaled_manhattan_dirt(10)        
]

#the following test mesure time_of_solution

for h in heu:
    algos.append(beamsearch_solution.beam_solution(h,30))

test_runner.runtest(algos, problem_sets = graphic_problems_2.three_sets_test() , test_parm = 'time',title = 'heuristics test on BS 30 - times')

algos = []

for h in heu:
    algos.append(beamsearch_solution.beam_solution(h,10))

test_runner.runtest(algos, problem_sets = graphic_problems_2.three_sets_test() , test_parm = 'time',title = 'heuristics test on BS 10 - times')

algos = []

for h in heu:
    algos.append(beamsearch_solution.beam_solution(h,30))

test_runner.runtest(algos, problem_sets = graphic_problems_2.three_sets() , test_parm = 'rate',title = 'heuristics test on BS 30 - success rates')

algos = []

for h in heu:
    algos.append(beamsearch_solution.beam_solution(h,10))

test_runner.runtest(algos, problem_sets = graphic_problems_2.three_sets() , test_parm = 'rate',title = 'heuristics test on BS 10 - success rates')
